package com.yanqu.road.server.cmd.union.activitygroup;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.union.UnionActivityGroupProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.union.activitygroup.Cross3UnionActivityGroupMgr;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C_UNION_ACTIVITY_GROUP_SYNC_RESP, desc = "同步分组数据 返回确认")
public class CrossUnionActivityGroupSyncRespCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        UnionActivityGroupProto.UnionActivityGroupSyncRespMsg respMsg = UnionActivityGroupProto.UnionActivityGroupSyncRespMsg.parseFrom(packet.getBytes());
        int activityId = respMsg.getActivityId();
        Cross3UnionActivityGroupMgr.setReceiveStatus(activityId, respMsg.getServerId(), respMsg.getCrossId());
    }

    @Override
    public void sendData() {
    }
}
